<template>
  <div>
    <div class="father">
      <van-search
        class="son"
        label="上海"
        show-action
        left-icon="arrow-down"
        v-model="value"
        placeholder="请输入小区或地址"
        @click-left-icon="fn"
      />
      <Chart></Chart>
      <div class="box">
        <van-grid clickable :column-num="4" :gutter="5">
          <van-grid-item to="/">
            <div class="box1">
              <van-icon
                name="wap-home-o"
                size="36px"
                text="整租"
                color="#3ec28b"
              />
            </div>
            <span>整租</span>
          </van-grid-item>
          <van-grid-item icon="friends-o" text="合租" url="/vant/mobile.html" />
          <van-grid-item icon="home-o" text="地图找房" to="/" />
          <van-grid-item
            icon="location-o"
            text="去出租"
            url="/vant/mobile.html"
          />
        </van-grid>
      </div>
    </div>
    <div><Rent></Rent></div>
  </div>
</template>

<script>
import Chart from '@/components/chart.vue'
import Rent from '@/components/rent.vue'
export default {
  name: 'index-page',
  data() {
    return {
      value: ''
    }
  },
  methods: {
    fn() {
      this.$router.push('./city')
    }
  },
  components: {
    Chart,
    Rent
  }
}
</script>

<style scoped lang="less">
// ::v-deep .van-grid-item .van-icon {
//   width: 50px;
//   height: 50px;
//   background-color: skyblue;
//   border-radius: 50%;
//   text-align: center;
// }
.box1 {
  width: 40px;
  height: 40px;
  text-align: center;
  background-color: #f2fbf7;
  border-radius: 50%;
  box-sizing: border-box;
  line-height: 60px;
}
.father {
  position: relative;
  .son {
    position: absolute;
    z-index: 99;
    top: 20px;
    left: 20px;
    height: 35px;
    width: 340px;
  }
  .my-swipe {
    height: 200px;
  }
}
</style>
